Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor codebase, also removing some features #14

Merged
merged 26 commits into from
Oct 16, 2019
Merged

Refactor codebase, also removing some features #14

merged 26 commits into from
Oct 16, 2019

Conversation

dmorn
Copy link
Owner

@dmorn dmorn commented Oct 16, 2019

The dynamic build of the filtering regular expression based on user input was removed, as it is not so useful in practise. From now on the user is expected to provide the raw regex by himself.
This merge has an incompatible API compared with the previous version of the library.

@dmorn dmorn self-assigned this Oct 16, 2019
},
}

type Encoder interface {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type Encoder should have comment or be unexported

}

func init() {
rootCmd.AddCommand(versionCmd)
func (e *Encoder) Encode(set []onf.ONF) error {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method Encoder.Encode should have comment or be unexported

Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Version: %s, Commit: %s, Built at: %s\n\n", Version, Commit, BuildTime)
},
func NewEncoder(w io.Writer) *Encoder {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function NewEncoder should have comment or be unexported

Commit = "N/A"
BuildTime = "N/A"
)
type Encoder struct {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type Encoder should have comment or be unexported

Pid int
}

func Run() ([]ActiveConnection, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function Run should have comment or be unexported

"gopkg.in/pipe.v2"
)

type ActiveConnection struct {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type ActiveConnection should have comment or be unexported

DstAddr net.Addr // Destination address
}

func Run() ([]OpenFile, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function Run should have comment or be unexported

"gopkg.in/pipe.v2"
)

type OpenFile struct {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type OpenFile should have comment or be unexported

return scanner.Err()
}

func ParseNetAddr(network, addr string) (net.Addr, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function ParseNetAddr should have comment or be unexported

"strings"
)

func ChunkLine(line string, sep string, min int) ([]string, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function ChunkLine should have comment or be unexported

},
}

type Encoder interface {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type Encoder should have comment or be unexported

}

func init() {
rootCmd.AddCommand(versionCmd)
func (e *Encoder) Encode(set []onf.ONF) error {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method Encoder.Encode should have comment or be unexported

Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Version: %s, Commit: %s, Built at: %s\n\n", Version, Commit, BuildTime)
},
func NewEncoder(w io.Writer) *Encoder {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function NewEncoder should have comment or be unexported

Commit = "N/A"
BuildTime = "N/A"
)
type Encoder struct {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type Encoder should have comment or be unexported

@dmorn dmorn merged commit 805a5ef into master Oct 16, 2019
@dmorn dmorn deleted the refactoring branch October 16, 2019 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant